Skip to content

Conversation

@Jiei-S
Copy link
Contributor

@Jiei-S Jiei-S commented Sep 7, 2023

概要

データセットをPython SDKから登録できる - dataset(visibility - organization)

関連

https://github.com/fastlabel/fastlabel-application/pull/4388

テスト

Create

正常

dataset = client.create_dataset(
    name="object-detection", license="The MIT License", visibility="organization"
)
{'createdAt': '2023-09-07T06:38:51.121Z',
 'id': '783ab8d8-f380-4047-b80f-fc70e8a9e625',
 'license': 'The MIT License',
 'name': 'object-detection',
 'tags': [],
 'updatedAt': '2023-09-07T06:38:51.121Z',
 'visibility': 'organization'}

スクリーンショット 2023-09-07 15 39 47

異常 - 組織なし

dataset = client.create_dataset(
    name="object-detection", license="The MIT License", visibility="organization"
)
fastlabel.exceptions.FastLabelInvalidException: <Response [422]> Workspace must be associated with an organization.

正常 - リグレッション

dataset = client.create_dataset(
    name="object-detection2", license="The MIT License", visibility="workspace"
)
{'createdAt': '2023-09-07T06:42:13.109Z',
 'id': 'a2bc0fc9-c7b6-4c81-9393-fcf39ea4331a',
 'license': 'The MIT License',
 'name': 'object-detection2',
 'tags': [],
 'updatedAt': '2023-09-07T06:42:13.109Z',
 'visibility': 'workspace'}

スクリーンショット 2023-09-07 15 43 14

Get

正常

datasets = client.get_datasets(visibility="organization")
[{'createdAt': '2023-09-07T06:38:51.121Z',
  'id': '783ab8d8-f380-4047-b80f-fc70e8a9e625',
  'license': 'The MIT License',
  'name': 'object-detection',
  'tags': [],
  'updatedAt': '2023-09-07T06:38:51.121Z',
  'visibility': 'organization'}]

スクリーンショット 2023-09-07 15 46 13

正常 - リグレッション

datasets = client.get_datasets(visibility="workspace")
[{'createdAt': '2023-09-07T06:42:13.109Z',
  'id': 'a2bc0fc9-c7b6-4c81-9393-fcf39ea4331a',
  'license': 'The MIT License',
  'name': 'object-detection2',
  'tags': [],
  'updatedAt': '2023-09-07T06:42:13.109Z',
  'visibility': 'workspace'},
 {'createdAt': '2023-09-06T05:16:51.422Z',
  'id': '13907b78-d24e-4221-b5f7-2e60e1c0d9a1',
  'name': 'test1',
  'tags': [],
  'updatedAt': '2023-09-06T05:16:51.422Z',
  'visibility': 'workspace'}]

スクリーンショット 2023-09-07 15 48 10
※ name=object-detection のみ organization

@Jiei-S Jiei-S self-assigned this Sep 7, 2023
@Jiei-S Jiei-S marked this pull request as ready for review September 7, 2023 06:55
@Jiei-S Jiei-S requested a review from ueno-k-work September 7, 2023 06:56
@ueno-k-work ueno-k-work merged commit 87b2f56 into main Sep 8, 2023
@ueno-k-work ueno-k-work deleted the feature/dataset-visibility-organization branch September 8, 2023 03:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants